Difference between `<%#` and `<%=` and an asp.net ascx file?

Posted by jax on Stack Overflow See other posts from Stack Overflow or by jax
Published on 2012-04-03T05:24:42Z Indexed on 2012/04/03 5:29 UTC
Read the original article Hit count: 155

Filed under:

I understand that <%= is for returning a String

I seem to usually use <%# in my .ascx files.

For example the following works

OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %>

The following does not work

OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %>

© Stack Overflow or respective owner

Related posts about ASP.NET